
set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF) #fmt默认使用BUILD_SHARED_LIBS作共享库生成标记，先设置为OFF，添加fmt后再恢复
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/spdlog" "${PROJECT_BINARY_DIR}/spdlog")
target_link_directories(spdlog PUBLIC "${PROJECT_BINARY_DIR}/spdlog")
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD})
